{include file="public/head"}

<body>
<div id="wrapper">

    <div class="gray-bg dashbard-1">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content">
                            <form class="form-horizontal m-t" id="commentForm">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">会员账号：</label>
                                    <div class="col-sm-8">
                                        <input  type="text" class="form-control" value="{$ApplyInfo.username}" readonly>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">理财金额：</label>
                                    <div class="col-sm-8">
                                        <input  type="text" class="form-control" value="{$ApplyInfo.deposit}$" readonly>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">申请等级：</label>
                                    <div class="col-sm-8">
                                        <select class="form-control" readonly disabled="disabled">
                                            {volist name="LevelList" id="v"}
                                                <option value="$v.id" {if condition="$ApplyInfo.level_id eq $v.id"}selected{/if}>{$v.name}</option>
                                            {/volist}
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">申请备注信息：</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" style="height: 100px" readonly>{$ApplyInfo.remarks}</textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">修改等级：</label>
                                    <div class="col-sm-8">
                                        <select class="form-control" id="save_level_id" name="save_level_id" {if condition="$ApplyInfo.status gt 0"} readonly disabled="disabled" {/if}>
                                            {volist name="LevelList" id="vo"}
                                            <option value="{$vo.id}" {if condition="$ApplyInfo.save_level_id eq $vo.id"}selected{/if}>{$vo.name}</option>
                                            {/volist}
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">处理备注信息：</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" id="sure_remarks" name="sure_remarks" style="height: 100px" {if condition="$ApplyInfo.status gt 0"} readonly {/if} >{$ApplyInfo.sure_remarks}</textarea>
                                    </div>
                                </div>

                                <input type="hidden" id="id" value="{$ApplyInfo.id}">
                                {if condition="$ApplyInfo.status eq 0"}
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-3">
                                        <button class="btn btn-primary" type="submit">确认处理</button>
                                    </div>
                                </div>
                                {/if}
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>
<script src="__STATIC__/Admin/js/jquery-2.1.1.min.js"></script>
<script src="__STATIC__/Admin/js/bootstrap.min.js?v=3.4.0"></script>
<script src="__STATIC__/Admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="__STATIC__/Admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/Admin/layer/layer.js"></script>
<script>
    $('form').submit(function (e) {
        e.preventDefault();
        var sure_remarks = $('#sure_remarks').val();
        if(sure_remarks == ""){
            layer.msg('请填写处理备注信息',{icon: 5,time:1500});
            return false;
        }
        $.ajax({
            type:"post",
            url:"{:url('Level/LevelSure')}",
            data:{
                id:$('#id').val(),
                save_level_id:$('#save_level_id').val(),
                sure_remarks:$('#sure_remarks').val(),
            },
            dataType:"json",
            success:function(data){
                if(data.status == 1){
                    layer.msg(data.message,{icon: 6,time:1500},function () {
                        window.top.location.reload();
                    });
                }else{
                    layer.msg(data.message,{icon: 5,time:1500});
                }
            }
        })
    })
</script>
</body>
</html>